package com.huabo.contract.mysql.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author huabo
 * @since 2022-03-16
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @TableName("TBL_LEGAL_DISPUTREGISTRATION")
@ApiModel(value="TblLegalDisputregistration对象", description="")
public class TblLegalDisputregistrationMySql implements Serializable {
//隶属纠纷
    private static final long serialVersionUID = 1L;

      @TableId("DISPUTEID")
      @ApiModelProperty(value = "主键Id 自增")
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select ATTCHMENT_SEQUENCE.nextval from dual")
      private Integer disputeid;

    @TableField("DISPUTENO")
    private String disputeno;//登记编号

    @TableField("DISPUTESTATUS")
    private BigDecimal disputestatus;

    @TableField("DISPUTETYPE")//纠纷类型
    private String disputetype;

    @TableField("CONTRACTINFO")
    private BigDecimal contractinfo;

    @TableField("DISPUTECOURS")//争议焦点
    private String disputecours;

    @TableField("ISUEGENT")//是否紧急：1是，2否
    private BigDecimal isuegent;

    @TableField("WHETHERSUED")//起诉类型：1起诉，2被诉
    private BigDecimal whethersued;

    @TableField("DISPUTEUNDERTAKER")
    private BigDecimal disputeundertaker;

    @TableField("LASTDEALDATE")//办结时间
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date lastdealdate;

    @TableField("SOLUTIONSUGGESTIONS")
    private String solutionsuggestions;//初步解决建议

    @TableField("PLAINTIFF")//原告
    private String plaintiff;

    @TableField("DEFENDANT")//被告
    private String defendant;

    @TableField("ATTORNEY")//代理律师
    private String attorney;

    @TableField("ATTORNEYPHONT")//代理律师联系电话
    private String attorneyphont;

    @TableField("LINKORG")
    private BigDecimal linkorg;

    @TableField("DISPUINFO")
    private BigDecimal dispuinfo;

    @TableField("CREATESTAFF")
    private BigDecimal createstaff;

    @TableField("CREATETIME")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date createtime;//查询中的受理日期

    @TableField("DISPUTEITEM")
    private String disputeitem;//纠纷主题

    @TableField("ISATTORNEY")//是否聘请律师：1是，2否
    private BigDecimal isattorney;

      @ApiModelProperty(value = "贵安配合人员")
      @TableField("COORDINATION")
    private String coordination;

      @ApiModelProperty(value = "贵安纠纷登记-案由")
      @TableField("CASECAUSE")
    private String casecause;

      @ApiModelProperty(value = "贵安纠纷登记-涉诉项目")
      @TableField("SSPROJECT")
    private String ssproject;

      @ApiModelProperty(value = "贵安纠纷登记-管辖法院（仲裁机构）")
      @TableField("COURTFIRST")
    private String courtfirst;

      @ApiModelProperty(value = "贵安纠纷登记-诉讼金额")
      @TableField("LITIGATIONAMOUNT")
    private BigDecimal litigationamount;

      @ApiModelProperty(value = "贵安纠纷登记-发生时间")
      @TableField("OCCURRENCETIME")
      @JSONField(format = "yyyy-MM-dd")
      @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date occurrencetime;

      @ApiModelProperty(value = "贵安纠纷登记-涉及子公司")
      @TableField("SUBSIDIARIES")
    private String subsidiaries;
      @Transient//纠纷承办人TblStaff-username
      private String zxstaffname;

    @Transient//纠纷承办人TblStaff
    private String username;

    @Transient//合同执行人呢
    private String realname;

//    @Transient
//    private String contractName;

    @Transient
    private TblCyhwUnitMySql contract;
    @Transient
    private Integer uniqueResult;

    @Transient
    private TblStaffMySql disputeUnder;

    @Transient
    private List<TblAttachmentMySql> attList;

    //映射TblCyhwUnit


    @Transient
    private BigDecimal contractid;

    @ApiModelProperty(value = "隶属流程id 关联Tbl_flow flowid")
    @Transient
    private BigDecimal flowid;

    @ApiModelProperty(value = "单位名称")
    @Transient
    private String unitname;

    @ApiModelProperty(value = "合同名称")
    @Transient
    private String contractname;

    @ApiModelProperty(value = "合同编号")
    @Transient
    private String contractno;

    @ApiModelProperty(value = "承办部门")
    @Transient
    private BigDecimal contractdept;

    @ApiModelProperty(value = "合同对方")
    @Transient
    private String contractlink;

    @ApiModelProperty(value = "合同金额")
    @Transient
    private BigDecimal contractmoney;

    @ApiModelProperty(value = "合同状态 1-审批中、2-需调整、3-已通过、4-已终止、5-已跟踪、6-已完成、7-执行中、		8-已归档、		9-已暂停、		10-已变更、		11-已终止、		12-纠纷中、		13-协商中、		14-诉讼中、		15-仲裁中、		16-已结案")
    @Transient
    private Integer contractstatus;

    @ApiModelProperty(value = "关联科室")
    @Transient
    private String linkdept;

    @ApiModelProperty(value = "隶属组织")
    @Transient
    private BigDecimal orgid;

    @ApiModelProperty(value = "创建人")
    @Transient
    private BigDecimal createuser;

    @ApiModelProperty(value = "合同简要说明")
    @Transient
    private String momoconcat;

    @ApiModelProperty(value = "关联的风险控制")
    @Transient
    private String riskcontrol;

    @ApiModelProperty(value = "合同内容")
    @Transient
    private String describe;

    @ApiModelProperty(value = "承办人")
    @Transient
    private BigDecimal contractstaff;

    @ApiModelProperty(value = "保密等级")
    @Transient
    private String scrilevel;

    @ApiModelProperty(value = "合同开始时间")
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    private Date startdate;

    @ApiModelProperty(value = "合同结束时间")
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    private Date enddate;

    @ApiModelProperty(value = "合同项目")
    @Transient
    private String contractitem;

    @ApiModelProperty(value = "合同类型")
    @Transient
    private String contracttype;

    @ApiModelProperty(value = "合同期限类型")
    @Transient
    private String contractdatetype;

    @ApiModelProperty(value = "合同性质")
    @Transient
    private String contractxz;

    @ApiModelProperty(value = "合同相对方主键ID")
    @Transient
    private BigDecimal contractxdfxinfo;

    @ApiModelProperty(value = "合同类型 HTGL001 - 相对方、HTGL002-合同订立、HTGL003-合同用印、HTGL004-合同履行、HTGL005-变更、HTGL006-合同归档、HTGL007-合同范本")
    @Transient
    private String recordtype;

    @ApiModelProperty(value = "隶属合同 cyhwunitId")
    @Transient
    private BigDecimal recordparent;

    @ApiModelProperty(value = "合同金额汉字描述")
    @Transient
    private String hzsumowing;

    @ApiModelProperty(value = "计价方式")
    @Transient
    private String jijiatype;

    @ApiModelProperty(value = "币种")
    @Transient
    private String moneytype;

    @ApiModelProperty(value = "首付方向")
    @Transient
    private String dctype;

    @ApiModelProperty(value = "合同标的")
    @Transient
    private String contractbd;

    @ApiModelProperty(value = "是否重大合同")
    @Transient
    private String contractzd;

    @ApiModelProperty(value = "经办人")
    @Transient
    private BigDecimal jbstaff;

    @ApiModelProperty(value = "经办部门")
    @Transient
    private BigDecimal jbdept;

    @ApiModelProperty(value = "经办公司")
    @Transient
    private BigDecimal jbunit;

    @ApiModelProperty(value = "执行公司")
    @Transient
    private BigDecimal zxunit;

    @ApiModelProperty(value = "是否关联主合同")
    @Transient
    private String contractchildren;

    @ApiModelProperty(value = "是否有履行计划")
    @Transient
    private String contractplan;

    @ApiModelProperty(value = "合同立项信息")
    @Transient
    private String topicid;

    @ApiModelProperty(value = "合同立项名称")
    @Transient
    private String topicname;

    @ApiModelProperty(value = "历史状态")
    @Transient
    private BigDecimal hiscontractstatus;

    @ApiModelProperty(value = "变更类型")
    @Transient
    private String changetype;

    @ApiModelProperty(value = "变更时间")
    @Transient
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime changedate;

    @ApiModelProperty(value = "变更内容")
    @Transient
    private String changedesc;

    @Transient
    private BigDecimal counterpartbank;
    @Transient//协商过程id
    private Integer negotiaid;
    @Transient//诉讼过程记录id
    private Integer proceedid;
    @Transient//诉讼过程id
    private Integer litigationid;
    @Transient//仲裁过程id
    private Integer arbitraid;
    @Transient//资质保全id
    private Integer qualid;
    @Transient//账户冻结id
    private Integer inforid;
    @Transient//结案id
    private Integer closeid;

    @Transient
    private Integer CLOSECOUNT;
    @Transient
    private Integer ZCCOUNT;
    @Transient
    private Integer SSCOUNT;
    @Transient
    private Integer XSCOUNT;

//											<c:when test="${pageScope.t.clCount > 0}">已结案</c:when>
//											<c:when test="${pageScope.t.zcCount > 0}">仲裁中</c:when>
//											<c:when test="${pageScope.t.ssCount > 0}">诉讼中</c:when>
//											<c:when test="${pageScope.t.xcCount > 0}">协商中</c:when>
//											<c:otherwise>纠纷中</c:otherwise>

        //TBL_ORGANIZATION
   @Transient
    @ApiModelProperty(value = "公司名称")
    private String orgname;
    @Transient
    private BigDecimal fatherorgid;
    @Transient
    @ApiModelProperty(value = "公司编号")
    private String orgnumber;
    @Transient
    @ApiModelProperty(value = "公司简介")
    private String orgmeno;
    @Transient
    @ApiModelProperty(value = "备注")
    private String memo;
    @Transient
    private String icode;
    @Transient
    private Integer orgtype;
    @Transient
    private Integer auditType;
    @Transient
    private Integer status;
    @Transient
    private String iszy;
    @Transient
    private String hyzsktype;
    @Transient
    private Integer orderid;
    @Transient
    private Integer outsideid;
    @Transient
    private String outsideopendid;
    @ApiModelProperty(value = "是否使用自动编号 0 不使用；1 使用")
    @Transient
    private Integer isautonumber;
    @Transient
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date orgcreate;
    @Transient
    private Integer isinitialization;
    @ApiModelProperty(value = "职务")
    @Transient
    private String duties;
    @ApiModelProperty(value = "行业编号")
    @Transient
    private Integer industryid;
    @ApiModelProperty(value = "新增来源于微信 1为微信 0为pc")
    @Transient
    private String bywx;
    @Transient
    private String datasource;
    @Transient
    private String historycode;
    @Transient
    private String historydepartmentid;
}
